import Fly from '../pages/index/wx.js'
const fly = new Fly()
fly.config.baseURL = " http: //129.211.169.131:13688 " 
fly.config.timeout = 10000 

//请求拦截器
fly.interceptors.request.use(config => {
  wx.showLoading({
    title: '正在玩命加载',
  })
  return config
}, err => {
  return Promise.reject(err)
})

fly.interceptors.response.use(response => {
    wx.showToast({
      title: '请求成功',
    })

    return response.data
  },
  err => {
    return Promise.resolve(err)
  }
)

export default fly